
/**
 * Copyright (c) subnew ;
 * email:joseanluo@gmail.com;
 * Licensed under the GPL;  
 * @Title: DynamicDataSource.java;
 * @Package com.subnew.framework.core.extend.datasource;
 */
package com.subnew.mango.frame.dao.datasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 动态数据源实现类<br>
 * 继承自：org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource。
 * @author JoseanLuo
 * @date  2014-7-16 上午12:03:04
 * @history new 
 * @version V1.0 
 */
public class DynamicDataSource extends AbstractRoutingDataSource{
    
	/**
	 * 取得当前数据源标识。返回DataSourceType枚举。
	 */
	@Override
	protected Object determineCurrentLookupKey() {
		return DataSourceContextHolder.getDataSourceType();
	}

}
